#include <iostream>

#include "LList.h"

using namespace std;
using namespace CppLList;

int main()
{
    int intArr[] = {0,1,2,3,4,5,6,7,8,9,10,11,12};
    size_t i = 7;

    try
    {
        LList<int> list;
    }
    catch(exception& e)
    {
        cerr<<"ERROR OCCURED: "<<e.what()<<endl;
    }


    LList<int> list;
    LList<int>::Iterator it = list.Begin();

    cout<<"Is Empty? : "<<list.IsEmpty()<<endl;

    for(i = 0; i < sizeof(intArr)/sizeof(int); ++i)
    {
        list.Insert(it, intArr + i);
    }

    cout<<"Is Empty? : "<<list.IsEmpty()<<endl;

    for(it = list.Begin(); it!=list.End(); ++it)
    {
        cout<<*(it.Get())<<" ";
    }
    cout<<endl;

    const LList<int> listCopy(list);
    LList<int>::ConstIterator cit(list.Begin());

    for(cit = listCopy.Begin(); cit!=listCopy.End(); ++cit)
    {
        cout<<*(cit.Get())<<" ";
    }
    cout<<endl;




    //list.Insert(cit, &i2);



    it = list.Begin();
    cit = list.Begin();
    cit = list.Remove(cit);
    //cout<<*(cit.Get())<<endl;

    //it = list.Begin();
    //cout<<*(it.Get())<<endl;
//    --cit;

    const LList<int>::Iterator it5(list.Begin());

    cout<<(operator==(it ,cit))<<endl;

    LList<int> list2 = list;

    //list.Remove(it);

    const LList<int> clist;

    //cout<<*((clist.End()).Get())<<endl;
    clist.Begin();

    return 0;
}
